<?php

$dirStr = "";

if(isset($_REQUEST['mobiliz_gis_server']))
{
	$mobiliz_gis_server = $_REQUEST["mobiliz_gis_server"];
}
else
{
	$mobiliz_gis_server = "";
}

if(isset($_REQUEST['company_id']))
{
	$company_id = $_REQUEST["company_id"];
}
else
{
	$company_id = "";
}



if ($mobiliz_gis_server  != "")
{
	if ($company_id != "")
	{
		$dirStr = "./companypoints/".$mobiliz_gis_server."/".$company_id;
	}
	else
	{
		$dirStr = "./companypoints/".$mobiliz_gis_server;
	}
}
else
{
	if ($company_id != "")
	{
		$dirStr = "./companypoints/no_server_info/".$company_id;
	}
	else
	{
		$dirStr = "./companypoints";
	}
}



$handle = opendir ($dirStr);
while (false !== ($file = readdir($handle)))
{
		if($file != "." && $file != ".." && $file != basename(__FILE__) && is_file($dirStr."/".$file))
		{
				//echo '<img src="/img/'.$file.'"/>'.$file.'';
				echo $file."-##-";
				//echo $dirStr;
				//var_dump(is_file($dirStr."/companypoints/".$file));
				clearstatcache();

		}
}

?>